/******************************************************************
Copyright © LibKz 2017~2023. All rights reserved.
* @projectName   LibKz
* @author        Raiiwhen
* @email         masterraii@icloud.com
* @origin        \06_Car\01_TJ_Cat_WheelSpeedLoop\HARDWARE
*******************************************************************/
#ifndef _MOTOR_H_
#define _MOTOR_H_

#include "stm32f4xx.h"
//#define TEST_CAN1_RX
typedef struct MOTOR_FEEDBACK{
	u8 motor_ID;
	float cmd[4];
	float rpm[4];		//round per min
	float deg[4];	//0~360deg
	float mom[4];		//real force moment
}RAM_HORN;

void M2006_Init(void);
void M2006_Thr(float LF,float LB,float RF,float RB);
void M2006_Feedback(RAM_HORN* obj);
float get_vel(u8 paw);
float get_thr_openloop(u8 paw, float vel);
float cmd2vel_openloop(u8 paw, float thr);
float cmd2vel_closeloop(float cmd);

#endif


